<template>
  <view class="bg-white flex h-100rpx items-center mt-20rpx justify-between px-32rpx" border="base b-2 b-solid">
    <text class=" font-medium text-#333 ">
     {{ props.title }}
    </text>
    <image  v-if="props.url" src="@/static/images/add.png" class="w-40rpx h-40rpx cursor-pointer" @click="navigateTo"></image>
  </view>
</template>

<script setup lang="ts">

const props = defineProps<{
  title: string
  url?: string
}>()

async function navigateTo(url = props.url) {
  if (!url) return
  await uni.navigateTo({
    url,
  })
}

</script>

<style scoped>

</style>
